package org.govhack.okcapital.controllers;

import java.util.Arrays;
import java.util.List;

import org.govhack.okcapital.model.City;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class CityController extends BaseController {
    
    @RequestMapping("/getAllCities.do")
    public ModelAndView getAllCities() {
        List<City> allCities = Arrays.asList(
            new City("http://semanticweb.org/id/Adelaide", "Adelaide", "EPSG:4326", 138.600340, -34.928727),
            new City("http://dbpedia.org/resource/Brisbane_central_business_district", "Brisbane", "EPSG:4326", 153.0231440, -27.470811),
            new City("http://semanticweb.org/id/Canberra", "Canberra", "EPSG:4326", 149.128633, -35.282236),
            new City("http://dbpedia.org/resource/City_of_Darwin ", "Darwin", "EPSG:4326", 130.841846, -12.463229),
            new City("http://dbpedia.org/resource/City_of_Hobart", "Hobart", "EPSG:4326", 147.323871, -42.881908),
            new City("http://dbpedia.org/resource/Melbourne_city_centre ", "Melbourne", "EPSG:4326", 144.962797, -37.813174),
            new City("http://dbpedia.org/resource/City_of_Perth ", "Perth", "EPSG:4326", 115.857611, -31.952891),
            new City("http://dbpedia.org/resource/Sydney_City ", "Sydney", "EPSG:4326", 151.207066, -33.873694)
        );
        
        return generateJsonResponse(true, allCities);
    }
}
